package com.treeliked.netdiskdemo.service.impl;

import com.treeliked.netdiskdemo.model.dao.UserMapper;
import com.treeliked.netdiskdemo.model.dataobject.User;
import com.treeliked.netdiskdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户服务实现
 *
 * @author lqs2
 * @date 2018/12/5, Wed
 */
@Service
public class UserServiceImpl implements UserService {

    /**
     * mapper
     */
    private final UserMapper userMapper;

    @Autowired
    public UserServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public User hasMatchUser(String name, String pwd) throws Exception {
        return userMapper.hasMatchUser(name, pwd);
    }
}
